/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.worlds.ui.edge;

import java.awt.Color;
import java.util.ArrayList;


public class EMenuBar extends EStickyFrame{
    int menuX = 0;
    private ArrayList<EMenu> menus = new ArrayList<EMenu>(8);
    private ArrayList<EButton> menuButtons = new ArrayList<EButton>(8);
    private Color buttonColor = new Color(85, 85, 85);
    public EMenuBar()
    {
        super(null, -1, 25, 0, 0, -1, 0);
        setBackgroundColor(new Color(85, 85, 85));
        setUndecorated(true);
        EDGESettings.menuBar = this;
    }
    public EMenu addMenu(String title)
    {
        final EMenu menu = new EMenu(title, menuX);
        menus.add(menu);
        
        EButton btn = new EMenuTitle(menu, title, menuX);
        btn.setColor(buttonColor);

        addChild(1, btn);

        parent.addChild(6, menu);

        menuX += btn.getWidth();

        menuButtons.add(btn);
        return menu;
    }
}
